import { RouteRecordRaw } from 'vue-router';

// 主页面下的操作窗体
export const homeRoutes: Array<RouteRecordRaw> = [
    {
        path: 'home',
        name: 'home',
        component: () => import('@/views/home/index.vue'),
        meta: {
            title: 'home',
            icon: 'home',
        }
    },
    {
        path: 'css',
        name: 'css',
        redirect: '/css/triangle',
        meta: {
            title: 'css',
            icon: 'css',
        },
        children: [{
            path: 'triangle',
            name: 'triangle',
            component: () => import('@/views/css/triangle/index.vue'),
            meta: {
                title: '三角形',
                icon: 'triangle',
            },
        },{
            path: 'sprites',
            name: 'sprites',
            component: () => import('@/views/css/sprites/index.vue'),
            meta: {
                title: '精灵图',
                icon: 'Sprite',
            },
        },{
            path: 'hotmap',
            name: 'hotmap',
            component: () => import('@/views/css/hotmap/index.vue'),
            meta: {
                title: '热点图',
                icon: 'hot',
            },
        },{
            path: 'runBear',
            name: 'runBear',
            component: () => import('@/views/css/runBear/index.vue'),
            meta: {
                title: '奔跑的熊',
                icon: 'bear',
            },
        },{
            path: 'rotateHorse',
            name: 'rotateHorse',
            component: () => import('@/views/css/rotateHorse/index.vue'),
            meta: {
                title: '旋转木马',
                icon: 'rocking-horse',
            },
        }]
    },
    {
        path: 'html',
        name: 'html',
        meta: {
            title: 'html5',
            icon: 'HTML',
        },
        children: [{
            path: 'echarts',
            name: 'echarts',
            component: () => import('@/views/html/echarts/index.vue'),
            meta: {
                title: 'ECharts',
                icon: 'eCharts',
            },
        },{
            path: 'canvas',
            name: 'canvas',
            component: () => import('@/views/html/canvas/index.vue'),
            meta: {
                title: 'canvas',
                icon: 'sign',
            },
        },{
            path: 'map',
            name: 'map',
            component: () => import('@/views/html/map/index.vue'),
            meta: {
                title: 'Map',
                icon: 'sign',
            },
        }]
    },
    {
        path: 'vue',
        name: 'vue',
        meta: {
            title: 'Vue',
            icon: 'vue',
        },
        children: [{
            path: 'reactive',
            name: 'reactive',
            component: () => import('@/views/vue/reactive/index.vue'),
            meta: {
                title: '响应式',
                icon: 'sign',
            },
        },{
            path: 'pinia',
            name: 'pinia',
            component: () => import('@/views/vue/pinia/index.vue'),
            meta: {
                title: 'pinia',
                icon: 'sign',
            },
        }]
    },
    {
        path: 'bigScreen',
        name: 'bigScreen',
        component: () => import('@/views/screen/index.vue'),
        meta: {
            title: '数据大屏',
            icon: 'Screen',
        }
    },
]

export const routes = [
    {
        path: '/',
        redirect: '/home',
        children: homeRoutes
    },
];